package com.happy.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.happy.entity.FollowEntity;
import com.happy.entity.bo.FollowBo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FollowMapper extends BaseMapper<FollowEntity> {

    @Select ( value = "select fi.id, fi.userId, fi.friendId, fi.createTime, fi.changeTime, fi.isUsed, ui.userName, ui.nickName, ui.phone, ui.email, ui.company, ui.address, ui.sign, ui.sex, ui.country, ui.province, ui.city, file.fileUrl as headImgUrl from follow_info fi left join user_info ui on fi.friendId=ui.id left join file_info file on file.userId=ui.id where fi.userId=#{id}")
    List<FollowBo> queryList( int id);

}
